gtk_window_present_with_time: fix when window is not initially visible
authorDan Winship <danw@gnome.org>
Tue, 12 Apr 2011 17:03:38 +0000 (13:03 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 12 Apr 2011 17:03:38 +0000 (13:03 -0400)
commitb5d678dab098573c0c8371cf105d8e42f52cd89a
tree9aba8d455127c62cb4d1b75e85f2572b19089deb
parent91b52230013c32d3366886a367ad3b1f78c04f47
gtk_window_present_with_time: fix when window is not initially visible

When called on a hidden window, gtk_window_present_with_time() would
just fall back to gtk_widget_show(), completely ignoring the passed-in
timestamp. This ended up working anyway if the timestamp came from
in-process, since gdk_window_x11_show() would initialize its user_time
from the time of the most recent event. But if the timestamp came from
another process, this would result in the window being shown with an
out-of-date timestamp.

Fix this by remembering the timestamp from
gtk_window_present_with_time(), and then setting the GdkWindow's
user_time from that when it the window is realized.

https://bugzilla.gnome.org/show_bug.cgi?id=647275
gtk/gtkwindow.c